Optimal. Leaf size=55 \[ -\frac {\cos (e+f x)}{3 f (a+a \sin (e+f x))^2}-\frac {\cos (e+f x)}{3 f \left (a^2+a^2 \sin (e+f x)\right )} \]
[Out]
________________________________________________________________________________________
Rubi [A]
time = 0.02, antiderivative size = 55, normalized size of antiderivative = 1.00, number of steps
used = 2, number of rules used = 2, integrand size = 12, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.167, Rules used = {2729, 2727}
\begin {gather*} -\frac {\cos (e+f x)}{3 f \left (a^2 \sin (e+f x)+a^2\right )}-\frac {\cos (e+f x)}{3 f (a \sin (e+f x)+a)^2} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
Rule 2727
Rule 2729
Rubi steps
\begin {align*} \int \frac {1}{(a+a \sin (e+f x))^2} \, dx &=-\frac {\cos (e+f x)}{3 f (a+a \sin (e+f x))^2}+\frac {\int \frac {1}{a+a \sin (e+f x)} \, dx}{3 a}\\ &=-\frac {\cos (e+f x)}{3 f (a+a \sin (e+f x))^2}-\frac {\cos (e+f x)}{3 f \left (a^2+a^2 \sin (e+f x)\right )}\\ \end {align*}
________________________________________________________________________________________
Mathematica [A]
time = 0.07, size = 54, normalized size = 0.98 \begin {gather*} -\frac {-3+4 \cos (e+f x)+\cos (2 (e+f x))-4 \sin (e+f x)+\sin (2 (e+f x))}{6 a^2 f (1+\sin (e+f x))^2} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [A]
time = 0.20, size = 53, normalized size = 0.96
method | result | size |
risch | \(-\frac {2 i \left (i+3 \,{\mathrm e}^{i \left (f x +e \right )}\right )}{3 f \,a^{2} \left ({\mathrm e}^{i \left (f x +e \right )}+i\right )^{3}}\) | \(38\) |
derivativedivides | \(\frac {-\frac {4}{3 \left (\tan \left (\frac {f x}{2}+\frac {e}{2}\right )+1\right )^{3}}+\frac {2}{\left (\tan \left (\frac {f x}{2}+\frac {e}{2}\right )+1\right )^{2}}-\frac {2}{\tan \left (\frac {f x}{2}+\frac {e}{2}\right )+1}}{a^{2} f}\) | \(53\) |
default | \(\frac {-\frac {4}{3 \left (\tan \left (\frac {f x}{2}+\frac {e}{2}\right )+1\right )^{3}}+\frac {2}{\left (\tan \left (\frac {f x}{2}+\frac {e}{2}\right )+1\right )^{2}}-\frac {2}{\tan \left (\frac {f x}{2}+\frac {e}{2}\right )+1}}{a^{2} f}\) | \(53\) |
norman | \(\frac {-\frac {2 \tan \left (\frac {f x}{2}+\frac {e}{2}\right )}{a f}-\frac {2 \left (\tan ^{2}\left (\frac {f x}{2}+\frac {e}{2}\right )\right )}{a f}-\frac {4}{3 a f}}{a \left (\tan \left (\frac {f x}{2}+\frac {e}{2}\right )+1\right )^{3}}\) | \(63\) |
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [B] Leaf count of result is larger than twice the leaf count of optimal. 127 vs.
\(2 (55) = 110\).
time = 0.28, size = 127, normalized size = 2.31 \begin {gather*} -\frac {2 \, {\left (\frac {3 \, \sin \left (f x + e\right )}{\cos \left (f x + e\right ) + 1} + \frac {3 \, \sin \left (f x + e\right )^{2}}{{\left (\cos \left (f x + e\right ) + 1\right )}^{2}} + 2\right )}}{3 \, {\left (a^{2} + \frac {3 \, a^{2} \sin \left (f x + e\right )}{\cos \left (f x + e\right ) + 1} + \frac {3 \, a^{2} \sin \left (f x + e\right )^{2}}{{\left (\cos \left (f x + e\right ) + 1\right )}^{2}} + \frac {a^{2} \sin \left (f x + e\right )^{3}}{{\left (\cos \left (f x + e\right ) + 1\right )}^{3}}\right )} f} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [A]
time = 0.34, size = 103, normalized size = 1.87 \begin {gather*} \frac {\cos \left (f x + e\right )^{2} + {\left (\cos \left (f x + e\right ) - 1\right )} \sin \left (f x + e\right ) + 2 \, \cos \left (f x + e\right ) + 1}{3 \, {\left (a^{2} f \cos \left (f x + e\right )^{2} - a^{2} f \cos \left (f x + e\right ) - 2 \, a^{2} f - {\left (a^{2} f \cos \left (f x + e\right ) + 2 \, a^{2} f\right )} \sin \left (f x + e\right )\right )}} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [B] Leaf count of result is larger than twice the leaf count of optimal. 221 vs.
\(2 (46) = 92\).
time = 0.73, size = 221, normalized size = 4.02 \begin {gather*} \begin {cases} - \frac {6 \tan ^{2}{\left (\frac {e}{2} + \frac {f x}{2} \right )}}{3 a^{2} f \tan ^{3}{\left (\frac {e}{2} + \frac {f x}{2} \right )} + 9 a^{2} f \tan ^{2}{\left (\frac {e}{2} + \frac {f x}{2} \right )} + 9 a^{2} f \tan {\left (\frac {e}{2} + \frac {f x}{2} \right )} + 3 a^{2} f} - \frac {6 \tan {\left (\frac {e}{2} + \frac {f x}{2} \right )}}{3 a^{2} f \tan ^{3}{\left (\frac {e}{2} + \frac {f x}{2} \right )} + 9 a^{2} f \tan ^{2}{\left (\frac {e}{2} + \frac {f x}{2} \right )} + 9 a^{2} f \tan {\left (\frac {e}{2} + \frac {f x}{2} \right )} + 3 a^{2} f} - \frac {4}{3 a^{2} f \tan ^{3}{\left (\frac {e}{2} + \frac {f x}{2} \right )} + 9 a^{2} f \tan ^{2}{\left (\frac {e}{2} + \frac {f x}{2} \right )} + 9 a^{2} f \tan {\left (\frac {e}{2} + \frac {f x}{2} \right )} + 3 a^{2} f} & \text {for}\: f \neq 0 \\\frac {x}{\left (a \sin {\left (e \right )} + a\right )^{2}} & \text {otherwise} \end {cases} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [A]
time = 0.44, size = 50, normalized size = 0.91 \begin {gather*} -\frac {2 \, {\left (3 \, \tan \left (\frac {1}{2} \, f x + \frac {1}{2} \, e\right )^{2} + 3 \, \tan \left (\frac {1}{2} \, f x + \frac {1}{2} \, e\right ) + 2\right )}}{3 \, a^{2} f {\left (\tan \left (\frac {1}{2} \, f x + \frac {1}{2} \, e\right ) + 1\right )}^{3}} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Mupad [B]
time = 6.98, size = 76, normalized size = 1.38 \begin {gather*} -\frac {2\,{\cos \left (\frac {e}{2}+\frac {f\,x}{2}\right )}^2\,\sin \left (\frac {e}{2}+\frac {f\,x}{2}\right )-\frac {2\,\cos \left (\frac {e}{2}+\frac {f\,x}{2}\right )\,\left ({\cos \left (\frac {e}{2}+\frac {f\,x}{2}\right )}^2-3\right )}{3}}{a^2\,f\,{\left (\cos \left (\frac {e}{2}+\frac {f\,x}{2}\right )+\sin \left (\frac {e}{2}+\frac {f\,x}{2}\right )\right )}^3} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________